"""
小话题（大话题下）
"""

import requests
from bs4 import BeautifulSoup

headers = {
    'authority': 'www.zhihu.com',
    'pragma': 'no-cache',
    'cache-control': 'no-cache',
    'accept': '*/*',
    'x-requested-with': 'XMLHttpRequest',
    'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_16_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.92 Safari/537.36',
    'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
    'origin': 'https://www.zhihu.com',
    'sec-fetch-site': 'same-origin',
    'sec-fetch-mode': 'cors',
    'sec-fetch-dest': 'empty',
    'referer': 'https://www.zhihu.com/topics',
    'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8',
}

data = {
    'method': 'next',
    'params': '{"topic_id":3324,"offset":0,"hash_id":""}'
}

response = requests.post('https://www.zhihu.com/node/TopicsPlazzaListV2', headers=headers, data=data)

result = response.json()
msg = result.get('msg')  # list
for m in msg:
    print(m)
